package com.xywy.tangandroid.fragment;

import java.util.ArrayList;
import java.util.List;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.xywy.tangandroid.R;
import com.xywy.tangandroid.adapter.ExpertShareAdapter;
import com.xywy.tangandroid.bean.ExpertArtail;
import com.xywy.tangandroid.vollery.VolleyManager;

public class ExperShareFragement extends Fragment {
	private ListView listview;
	private List<ExpertArtail> list;
	private ExpertShareAdapter adapter;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view=inflater.inflate(R.layout.fragement_doctorchurch, null);
		initView(view);
		initListener();
		initdata();
		
		return view;
	}
	private void initView(View view) {
	     listview = (ListView) view.findViewById(R.id.famous_doctor_listview);
	     list = new ArrayList<ExpertArtail>();
			for (int i = 0; i < 4; i++) {
				ExpertArtail object = new ExpertArtail();
				object.setTitle("haha");
				list.add(object);
			}
			adapter = new ExpertShareAdapter (getActivity(), list,1,"id");
			listview .setAdapter(adapter);
		}

		private void initListener() {

		}

		private void initdata() {

		}
		
		 @Override
	     public void onDestroy() {
		super.onDestroy();
		VolleyManager.cancelRequest(getActivity());
	    }
}
